const state = sessionStorage.getItem("state");
const initState = state
	? JSON.parse(state)
	: {
			role: "",
	  };
export function reducer(state = initState, action) {
	switch (action.type) {
		case "SET_ROLE":
			state.role = action.data;
			console.log(action);
			break;
		default:
	}
	sessionStorage.setItem("state", JSON.stringify(state));
	return JSON.parse(JSON.stringify(state));
}

//
